<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		/*缺点:
			3.占用的内存空间太大
		
		* 优化：
		* 	代码冗余
		* 	代码组织形式变好了
		* 	具有类型 
		* */
		Coder.prototype.coding=function(coding){
			console.log(coding)
		}
		function Coder(age,name,wife){
			this.age=age;
			this.name=name;
			this.wife=wife;
		}
		
		var obj =  new Coder(18,"damu","zdy");
		var obj2 =  new Coder(58,"hsp","tg");
		obj.coding("very good");
		
//		Object.prototype
/*		var obj ={
			userName:"xxx",
			age:18,
			num:1233223423423,
			info:{
				
			}
		}*/
		
	</script>
</html>
